import myaxios from '../Axios'
import BaseUrl from '../BaseUrl'
const {BASEURL} = BaseUrl
const orderApi={
    // 新增订单
    add(params:object){
        return myaxios.post(BASEURL+'/order/add',params)
    },

    //查询所有订单
    queryAll(params?:object){
        return myaxios.get(BASEURL+'/order/list',params)
    },

    // 通过id查询所有订单
    queryById(params:number){
        return myaxios.get(BASEURL+`/order/queryById?orderId=${params}`)
    },

    // 修改订单
    modify(params:object){
        return myaxios.post(BASEURL+'/order/modify',params)
    },

    // 删除订单
    del(params:number){
        return myaxios.get(BASEURL+`/order/delete?orderId=${params}`)
    },
    // 分页查询
    queryByPage(params:object){
        return myaxios.get(BASEURL+'/order/page',params)
    }
    
}

export default orderApi;